libvchan: Make raw_get_{data_ready, buffer_space} match
authorJason Andryuk <andryuk@aero.org>
Fri, 16 May 2014 20:48:16 +0000 (16:48 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 2 Jun 2014 13:36:05 +0000 (14:36 +0100)
commit821096dd8acc4b5ba32f942e3daf9ff2b928ce09
tree7be9eacdb94cff1a93d31eb1ac093e6b0c25ed2a
parent0716682851b9c29f3464b807246077aa085734cd
libvchan: Make raw_get_{data_ready, buffer_space} match

For writing into a vchan, raw_get_buffer_space used >, allowing the full
ring size to be written.  On the read side, raw_get_data_ready compared
the ring size with >=.  This mismatch means a completely filled buffer
cannot be read.  Fix this by making the size checks identical.

Signed-off-by: Jason Andryuk <andryuk@aero.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libvchan/io.c